package com.yy.shardingsphere.dao;

import com.yy.shardingsphere.vo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author yangyao
 * @Description: UserMapper
 * @date 2018/11/1 15:43
 */
@Mapper
public interface UserMapper {

    /**
     * 保存用户信息
     * @param user
     */
    public void save(User user);

    /**
     * 根据用户id查询user信息
     * @param userId
     * @return
     */
    public User getUserByUserId(@Param("userId") Long userId);

    /**
     * 查询所有User信息
     * @return
     */
    public List<User> getAllUsers();

}
